
import com.raitcon.hibernate.backbean.MyBean;
import com.raitcon.reports.ReportNotaBean;
import com.raitcon.hibernate.bean.CedulaMatricula;
import com.raitcon.hibernate.bean.Departamento;
import com.raitcon.hibernate.bean.DetalleNota;
import com.raitcon.hibernate.bean.Nota;
import com.raitcon.hibernate.bean.RolesAccion;
import com.raitcon.hibernate.db.CedulaMatriculaDB;
import com.raitcon.hibernate.db.DepartamentoDB;
import com.raitcon.hibernate.db.NotaDB;
import com.raitcon.hibernate.db.RolesAccionDB;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Mike
 */
public class Testing {
    
    public static void main(String [ ] args) throws SQLException
{
    
     //RolesAccionDB rolesAccion=new RolesAccionDB();
      //MaUsuarios usuarios = new MaUsuarios();
      //UsuarioDB usuarioDB=new UsuarioDB();
      //List<MaUsuarios>list=usuarioDB.getUsuariosAll();
    /*  RolesAccionDB rolesAccionDB=new RolesAccionDB();
      
      List<RolesAccion>list2=rolesAccionDB.getRolesAccionById(1);
      for(RolesAccion o: list2){
          
          System.out.println(o.getMenu().getName());
          //System.out.println(o.getLogin());
      }
       System.out.println("---------------------------------------------------------------------------");*/
      //MyBean myBeen=new MyBean();
      
      
     /* DepartamentoDB dptoDB=new DepartamentoDB();
      List<Departamento> dptoLis =dptoDB.getDepartamentoByIdPais("001");
      for(Departamento dpto: dptoLis){
         System.out.println(dpto.getDescripcion()); 
          
      */
      
  /*  List<RolesAccion>list3= myBeen.listRolesAccion(1);
     
      for(RolesAccion o1: list3){
          
          System.out.println(o1.getMenu().getName());
          //System.out.println(o.getLogin());
      }*/
      
        int xxx =0;
      
     /* CedulaMatriculaDB cedulaMatriculaDB= new CedulaMatriculaDB();
      // List<CedulaMatricula> cedulaMatriculaList = cedulaMatriculaDB.getCedulaMatriculaFilter("1", "1", "1", "1", "1");
        List<CedulaMatricula> cedulaMatriculaList = cedulaMatriculaDB.getCedulaMatriculaAll();
       
       for(CedulaMatricula o:cedulaMatriculaList ){
           System.out.println("Cedula:"+o.getAlumno().getCodAlumno());
           System.out.println("Cedula:"+o.getAlumno().getNombres());
           
       }*/
          
     /* NotaDB notaDB=new NotaDB();
      
      List<Object[]> listaResultados=notaDB.listNotaLibreta(1,1,1,1,1);
      //for(/*Object[] nota: list){
          
      //    System.out.println(nota[0].toString());
          //System.out.println(o.getLogin());
     // }
      
       for (int i = 0; i < listaResultados.size(); i++)
        {
            System.out.println("Nota:: " + i + ": " +
                    ((Nota)listaResultados.get(i)[0]).getIdNota() +
                    ", dt: " + ((DetalleNota)listaResultados.get(i)[1]).getCalificacion());
        }
      */
        ReportNotaBean rpt=new ReportNotaBean();
        ResultSet rs1=rpt.rsNotasLibreta();
        ResultSetMetaData rsmd = rs1.getMetaData();
        int columnCount = rsmd.getColumnCount();
         System.out.println( "columnas:: "+columnCount);
         while (rs1.next()) {
               System.out.println(rs1.getString("id_nota") + " "
                         + rs1.getString("calificacion"));
          }
          rs1.close();
       
}
    
}
